package com.example.demo.config;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * TODO
 *
 * @ClassName DynamicDataSource
 * @Author: HanQiCheng
 * @DateTime: 2022/7/26 10:14
 */
public class DynamicDataSource extends AbstractRoutingDataSource {
    @Override
    protected Object determineCurrentLookupKey() {
        return DataSourceUtil.getDB();
    }
}
